//
//  RSCameraOrLibraryVC.m
//  RSTools
//
//  Created by thinkjoy on 2017/9/14.
//  Copyright © 2017年 杜瑞胜. All rights reserved.
//

#import "RSCameraOrLibraryVC.h"
#import "UIViewController+RSCameraOrLibrary.h"
#import "UIView+RSSingleTap.h"

@interface RSCameraOrLibraryVC ()
@property (weak, nonatomic) IBOutlet UIImageView *mainImageV;
@property (weak, nonatomic) IBOutlet UILabel *runtimeTestLab;

@property (weak, nonatomic) IBOutlet UIButton *runtimeButt;
@end

@implementation RSCameraOrLibraryVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    __weak typeof(self) weakSelf    =   self;
    [_mainImageV setTapActionWithBlock:^{
        [weakSelf showCanEdit:NO saveInLibrary:NO photoType:RSCameraOrLibraryType_LibraryPhoto|RSCameraOrLibraryType_LibraryVideo|RSCameraOrLibraryType_CameraPhoto|RSCameraOrLibraryType_CameraVideo photoInfoBlock:^(NSDictionary *infoDic) {
            
            if (infoDic[RSCameraOrLibraryImage]) {
                weakSelf.mainImageV.image   =   infoDic[RSCameraOrLibraryImage];
            }
        }];
    }];
    
    [_runtimeTestLab setTapActionWithBlock:^{
        NSLog(@"点击Lab");
    }];
    
    [_runtimeButt setTapActionWithBlock:^{
        NSLog(@"点击BUTT");
    }];
    
    [_runtimeButt addTarget:self action:@selector(clickButt) forControlEvents:UIControlEventTouchUpInside];
    
}
- (void)clickButt
{
    NSLog(@"dianj了Butt");
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
